<?php

namespace App\Http\Controllers;
use App\ClassModel;
use Illuminate\Http\Request;

class ClassController extends Controller{
    public function class(){
        return view('class');

    }
    public function class_add(Request $request){
        $input=$request->input();
        unset($input['_token']);
        $ok=ClassModel::create($input);
        return $ok?'قوشۇش مۇۋاپىقيەتلىك بولدى!':'قوشۇش مەغلۇپ بولدى!';
    }
    public function class_table(){
        $uqur=ClassModel::get();
        return view('class_table',compact("uqur"));

    }

}
